//返回 满足距离的所有玩家
params ["_unit", "_dis"];

private _ret = objNull;


private _list =  AllPlayers select 
{
	(alive _x) 
	&& {_x distance _unit < _dis}
};

if(count _list > 0) then
{_ret = selectRandom _list};

_ret

